<?php
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
include '../operations/connection.php';	
$idlabel = $_REQUEST['idlabel'];
$name = $_REQUEST['name'];

$selectAllLabel = mysql_query("SELECT l.IDLable,l.LableName,
		(SELECT COUNT(*) FROM approvedoc a WHERE a.IDLabel=l.IDLable) as slApprove,
		(SELECT COUNT(*) FROM listapprove la,approvedoc a WHERE la.IDLabel=l.IDLable AND a.IDGroupApprove=la.IDGroupApprove 
			AND la.IDEmployee='$id_employee') as slgApprove,
		(SELECT COUNT(*) FROM list_reference lr,approvedoc a WHERE lr.IDLabel=l.IDLable AND a.IDGroupApprove=lr.id_group 
			AND lr.id_employee='$id_employee') as slreference
FROM list_lable l WHERE l.IDEmployee='$id_employee'");


?>

<div class="nav_top">
       		<div class="nav_tit"><?php echo $l_e_approval;?></div>     
            <div class="rehome"><a href="mainPhone.php"><?php echo $l_menu?></a></div>       
       	</div>
       	
  
		<span
			style="background: #424242; color: #FFFFFF; display: block; padding: 5px 0 5px 10px;"><?php echo "Edit Label";?>
		</span>
		<form action="content/process-editlabel.php" method="post">
		<input type="hidden" name="idlabel" id="idlabel" value="<?=$idlabel?>" />
		<table width="100%" style="margin: 20px 0">
			<tr>
				<td width="15%"><b><?php echo $l_name;?> </b></td>
				<td valign="top"><input type="text" id="vlNameLabel1"
					name="vlNameLabel1" style="height: 23px; width: 95%; border: 1px solid #ccc" size="35"
					maxlength="50" value="<?=$name?>" /></td>
			</tr>
			<tr>
				<td></td>
				<td>
					<div align="center" style="padding-top: 3px;">
						<a href="menu.php"><input type="button" class="buttonNormal"
							style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; width: 80px; float: right; margin-right: 13px;margin-left:5px"
							value="<?php echo $l_cancel;?>" /> 
							</a>
						<input type="submit" name="deletelabel"
							style="float: right; font-family: Arial, Helvetica, sans-serif; font-size: 12px; width: 80px;margin-left:5px"
							class="buttonNormal" value="<?php echo $l_delete;?>" />
						<input type="submit" name="editlabel"
							style="float: right; font-family: Arial, Helvetica, sans-serif; font-size: 12px; width: 80px; margin-left: 0px;"
							class="buttonNormal" value="<?php echo $l_edit;?>" />

					</div>
				</td>
			</tr>
		</table>
</form>